package com.lu.pojo.oop.commoninterface.comparator;

/**
 * @author luzhenfang
 * @date 2020 05 19
 * @description 新闻类
 */
public class NewsImpl implements Comparable<NewsImpl> {
    private int no;
    private String title;
    private String context;
    private int click;
    @Override
    public int compareTo(NewsImpl obj) {
        return this.click>obj.click?1:-1;
    }

    public NewsImpl(int no, String title, String context, int click) {
        this.no = no;
        this.title = title;
        this.context = context;
        this.click = click;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public int getClick() {
        return click;
    }

    public void setClick(int click) {
        this.click = click;
    }
}
